@extends('new.layouts.indexPublic')
@section('title'){{ $newsInfo->title.'-'.Site::get('webname') }} @endsection
@section('headcss')
    @parent
    <link rel="stylesheet" href="{{asset('/new/css/index/newsInfo.css')}}">
@endsection
{{--主体内容--}}
@section('content')
    {{--主导航--}}
    @include('new.layouts.mainNav')
    {{--主导航结束--}}

    {{--主要内容--}}
    <div class="main">
        <div class="wrapper">
            {{--主要内容-资讯列表--}}
            <div class="content">
                <div class="title">
                    <h2><span>{{ $newsInfo->title }}</span></h2>
                    <div class="status">
                        <span class="postDate">{{ $newsInfo->updated_at }}</span>
                        <span class="reading">浏览量：{{ $newsInfo->readnum }}</span>
                        @if(!empty($newsInfo->source))<span class="source">{{ '来源：'.$newsInfo->source}}</span>@endif
                        @if(!empty($newsInfo->publisher))<span class="publisher">{{ '作者：'.$newsInfo->publisher}}</span>@endif
                    </div>
                </div>
                <div class="section">{!! $newsInfo->editorValue !!}</div>
            </div>
            {{--主要内容-资讯列表结束--}}

            {{--侧边栏--}}
            <div class="aside">
                {{--搜索框--}}
                <form class="search" action="{{  route('news') }}" method="post" name="newsForm" id="newsForm">
                    {{csrf_field()}}
                    <input type="text" name="search" placeholder="请输入关键字" value="{{ old('search') }}"><button>搜索</button>
                </form>
                {{--热门文章--}}
                <div class="hotArticles">
                    <h2><span>热门文章</span></h2>
                    <ul>
                        @if(count($hotNews) > 0 )
                            @foreach($hotNews as $k=>$v)
                                <li>
                                    @if($k < 3)
                                        <a href="{{ route('newsinfo',['id'=>$v->id]) }}" target="_blank">
                                            <span class="top">{{$k+1}}</span><span class="cont">{{ msubstr($v->title,0,23) }}</span>
                                        </a>
                                    @else
                                        <a href="{{ route('newsinfo',['id'=>$v->id]) }}" target="_blank">
                                            <span class="num">{{$k+1}}</span><span class="cont">{{ msubstr($v->title,0,23) }}</span>
                                        </a>
                                    @endif
                                </li>
                            @endforeach
                        @endif
                    </ul>
                </div>
            </div>
            {{--侧边栏结束--}}
        </div>
    </div>
    {{--主要内容--}}
@endsection
{{--职位列表js--}}
@section('js')
    @parent
    <script>
    </script>
@endsection